import axios from 'axios';
import {loginreq, req, reqDetail} from './axiosFun';

// 登录接口
export const login = (params) => {
  return loginreq("post", "/api/login", params)
};
// 获取菜单
export const menu = (params) => {
  return axios.get("/api/menu?&token=" + localStorage.getItem('logintoken')).then(res => res.data)
};
// 退出接口
export const loginout = () => {
  return axios.delete("/api/login?&token=" + localStorage.getItem('logintoken')).then(res => res.data)
};
// 日志列表
export const deptList = (params) => {
  return req("post", "/api/list", params)
};
// 日志详情 -> 暂时废弃不用
export const deptDetail = (params) => {
  return reqDetail("post", "/api/detail", params)
};
// 保存接入服务
export const deptSave = (params) => {
  return req("post", "/api/install", params)
};
